/*=====================================================
Critical Links
Auto Configuration Server

Authors:
	Rui Eduardo Gouveia Gil - r-gil@critical-links.com

Date: 2010
Version 0.1
=======================================================*/
#ifndef __COMMAND_H__
#define __COMMAND_H__

#include <vector>
#include <string>
#include <iostream>
#include <rgcpp/tools/Encoder.h>
#include <rgcpp/tools/StringTokenizer.h>

namespace acs
{

class Command
{
	private:
		int id;
		unsigned int index;
		std::string command;
		std::vector<std::string> arguments;

	public:
		Command();
		Command(const int id, const std::string& command, const std::vector<std::string>& arguments);
		Command(const int id, const int index, const std::string& command, const std::vector<std::string>& arguments);
		~Command();

		void setID(const int id);
		int getID() const;

		void setIndex(const unsigned int index);
		unsigned int getIndex() const;

		void setCommand(const std::string& command);
		std::string getCommand() const;

		void setArguments(const std::vector<std::string>& arguments);
		std::vector<std::string> getArguments() const;

		void argumentsFromString(const std::string& args);
		std::string argumentsToString() const;

		std::string toXML() const;
};

}

#endif
